#ifndef RAND_UTIL_GPU_H
#define RAND_UTIL_GPU_H

#include "dataType.h"

namespace RandUtilGpu
{

__device__ DATA_TYPE rand0To1(curandState* randState);
__device__ DATA_TYPE randRange(curandState* randState, DATA_TYPE max);
__device__ unsigned int randRange(curandState* randState, unsigned int max);
__device__ DATA_TYPE randGaussian(curandState* randState);

__device__ inline DATA_TYPE rand0To1(curandState* randState)
{
	return curand_uniform(randState);
}

__device__ inline DATA_TYPE randRange(curandState* randState, DATA_TYPE max)
{
	return curand_uniform(randState) * max;
}

__device__ inline unsigned int randRange(curandState* randState, unsigned int max)
{
	return curand(randState) % max;
}

__device__ inline DATA_TYPE randGaussian(curandState* randState)
{
	return curand_normal(randState);
}

};

#endif